.tri(@len:6px,@color:#9e9e9e) {
  width: 0;
  height: 0;
  border: @len solid transparent;
  border-bottom-color: @color;
}

@leftWidth: 400px;

.flatFishGanttDialog {
  .mui-dialog-scroll-container {
    padding: 0 !important;
  }
  .mui-dialog-dialog {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    .refreshLoading {
      position: fixed;
      top: 110px;
      left: 400px;
    }
  }
}
.flatFishGanttWrap {
  height: 100%;
  overflow: hidden;
  .textOverflow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.ganttHeader {
  height: 50px;
  align-items: center;
  padding-right: 16px;
  .projectName {
    font-size: 17px;
    box-sizing: border-box;
    padding-left: 10px;
    width: 380px;
    margin-right: 20px;
  }
  .controlWrap {
    align-items: center;
    .today {
      width: 48px;
      height: 24px;
      line-height: 24px;
      text-align: center;
      border-radius: 4px;
      cursor: pointer;
      border: 1px solid #bdbdbd;
    }
    .chooseDisplayType {
      margin-left: 18px;
      line-height: 24px;
      border: 1px solid #bdbdbd;
      border-radius: 4px;
      span {
        cursor: pointer;
        padding: 5px 12px;
        &.week {
          border-left: 1px solid #eee;
          border-right: 1px solid #eee;
        }
        &.active {
          background-color: #9e9e9e;
          color: #fff;
        }
      }
    }
  }
  .operationWrap {
    align-items: center;
    .export {
      margin: 0 24px;
    }

    .operation {
      cursor: pointer;
      &:not(:hover) {
        span {
          color: #757575 !important;
        }
        .icon {
          color: #9e9e9e !important;
        }
      }
      span {
        margin-left: 6px;
        font-size: 13px;
      }
      .icon {
        font-size: 13px;
      }
    }
  }
  .close {
    width: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    &:not(:hover) {
      color: #9e9e9e !important;
    }
  }
}

.ganttContentWrap {
  position: relative;
  border: 1px solid #e0e0e0;
  justify-content: center;
  overflow: hidden;
  .activeLayer {
    position: absolute;
    left: 0;
    right: 0;
    height: 54px;
    pointer-events: none;
    display: none;
    background-color: rgba(51, 51, 51, 0.06);
  }
  .emptyGantt {
    align-self: center;
    text-align: center;
    img {
      width: 198px;
      height: 168px;
    }
    .explain {
      margin-top: 20px;
      font-size: 15px;
      color: #757575;
    }
  }
}
.ganttSideBarWrap {
  box-sizing: border-box;
  flex-shrink: 0;
  width: @leftWidth;
  overflow: hidden;
  overflow-x: auto;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.16);
  z-index: 1;
  header {
    line-height: 50px;
    font-size: 15px;
    padding-left: 14px;
  }

  .taskItem {
    line-height: 54px;
    cursor: pointer;
  }
  .taskListWrap {
    overflow-y: scroll;
  }
  .seq {
    margin: 0 8px;
    color: #9e9e9e;
    font-size: 12px;
  }

  .taskInfo {
    align-items: center;
    &.hoverLayer {
      background-color: rgba(0, 0, 0, 0.06);
    }
    .name {
      display: inline-block;
      min-width: 330px;
      color: #333;
      font-weight: bold;
      font-size: 14px;
    }
  }
  .childrenWrap {
    .name {
      font-size: 13px;
      font-weight: normal;
    }
  }
  .toggleTask {
    visibility: hidden;
    font-size: 14px;
    &:not(:hover) {
      color: #9e9e9e !important;
    }
    &.haveChildren {
      visibility: visible;
    }
  }
}
.ganttContentBox {
  overflow-x: scroll;
  position: relative;
  .timeHeader {
    position: absolute;
    flex-shrink: 0;
    .timeBox {
      box-sizing: border-box;
      border-bottom: 1px solid #e0e0e0;
      border-right: 1px solid #e0e0e0;
    }
    .pubTime {
      padding: 7px 0 0 15px;
      color: #757575;
      overflow: hidden;
    }
    .subTimeBox {
      display: flex;
      padding: 3px 0;
      .subTime {
        text-align: center;
        color: #757575;
        &.isToday {
          color: #2196f3;
        }
      }
    }
  }
  .graphWrap {
    display: flex;
    position: absolute;
    top: 50px;
    bottom: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    .graphBg {
      height: 100%;
      .subBg {
        border-right: 1px solid #e0e0e0;
        box-sizing: initial;
      }
      .isToday {
        background: rgba(33, 150, 243, 0.15);
        position: absolute;
        top: 0;
        height: inherit;
      }
    }
  }
  .bar {
    height: 18px;
    border-radius: 18px;
    background-color: #d0d0d0;
    &.active {
      background-color: #2196f3;
    }
    &.completed {
      background-color: #4caf50;
    }
  }
  .graphContent {
    position: absolute;
    width: 100%;
  }
  .processWrap {
    .processBox {
      height: 54px;
      align-items: center;
      &.hoverLayer {
        background-color: rgba(0, 0, 0, 0.06);
      }
    }
  }
  .processBar {
    height: 18px;
    cursor: pointer;
    .day {
      background-color: #d0d0d0;
      height: 100%;
      border-radius: 18px;
      &.tooShort {
        border-radius: 2px;
      }
      &.noStart {
        border-radius: 0px;
        border-top-right-radius: 18px;
        border-bottom-right-radius: 18px;
      }
      &.noEnd {
        border-radius: 0px;
        border-top-left-radius: 18px;
        border-bottom-left-radius: 18px;
      }
    }
    .inAdvance {
      background-color: #4caf50;
      &.after {
        &.noEnd {
          border-left-color: #4caf50;
        }
      }
      &.before {
        &.noStart {
          border-right-color: #4caf50;
        }
      }
    }
    .normal {
      background-color: #2196f3;
      &.after {
        &.noEnd {
          border-left-color: #2196f3;
        }
      }
      &.before {
        &.noStart {
          border-right-color: #2196f3;
        }
      }
    }
    .before {
      .tri(9px);
      border-color: transparent;
      border-right-color: #d0d0d0;
      background: transparent;
      margin-left: -18px;
    }
    .after {
      .tri(9px);
      border-color: transparent;
      border-left-color: #d0d0d0;
      background: transparent;
      margin-right: -9px;
    }
  }
  .taskName {
    margin-left: 10px;
    max-width: 150px;
    font-size: 14px;
  }
}

.saveImgBtnDisabled {
  .Button--primary {
    opacity: 0.5;
  }
}
